/**
 *******************************************************************************
 * @FileName  : att_ccc.h
 * @Author    : GaoQiu
 * @CreateDate: 2020-05-18
 * @Copyright : Copyright(C) GaoQiu
 *              All Rights Reserved.
 *******************************************************************************
 *
 * The information contained herein is confidential and proprietary property of
 * GaoQiu and is available under the terms of Commercial License Agreement
 * between GaoQiu and the licensee in separate contract or the terms described
 * here-in.
 *
 * This heading MUST NOT be removed from this file.
 *
 * Licensees are granted free, non-transferable use of the information in this
 * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
 *
 *******************************************************************************
 */
#ifndef ATTS_CCC_H_
#define ATTS_CCC_H_

#include "utils/defs_types.h"
#include "host_cfg.h"
#include "dm_conn.h"
#include "att_api.h"

typedef struct{
	uint16_t   *pCccValue;    /*<! Pointer CCC value memory */
	uint16_t    connHandle;
	uint8_t     connId;
	uint8_t     RFU[1];
}AttsClientCfgConnCb_t;

typedef struct{
#if HOST_CONN_CB_USE_DYNAMIC_MEM
	AttsClientCfgConnCb_t *ccb;
#else
	AttsClientCfgConnCb_t  ccb[DM_CONN_MAX];
#endif

	AttsCccSets_t          *pCccSets;         /*! Pointer CCC sets. */
	uint8_t                NumCccSets;        /*! the number of CCC in sets. */
	AttsCccCback_t         cccCback;
}AttsClientCfgCb_t;

extern AttsClientCfgCb_t  attsCccCb;

void ATTS_InitCccTable(DmConnId_t connId);
void ATTS_ClearCccTable(DmConnId_t connId);

bool_t ATTS_IsCccRegisted(void);

#endif /* ATTS_CCC_H_ */
